<?php
header("Content-type: text/html; charset=utf-8");
require __DIR__ . '/autoload.php';

use aw\ReadAwdb;
$ipAddress = '211.112.21.0';
# $ipAddress = '2001:023a:0000:0000:0000:0000:0000:0000';
# databaseFile修改为埃文标准库
$databaseFile = 'test.awdb';
$reader = new ReadAwdb($databaseFile);
$result = json_encode($reader->readAwdb($ipAddress),JSON_UNESCAPED_UNICODE);
echo "$result\n";
$reader->close();
?>
